#include<stdio.h>

void ShiftZeroes(int arr[], int n)
{
    int count = 0;
    for (int i = 0; i < n; i++)
        if (arr[i] != 0){
            arr[count++] = arr[i];
        }
        while (count < n){
        arr[count++] = 0;
        }
}

int main()
{
    int n;
    //number of elements
    printf("Enter the number of elements:\n");
    scanf("%d",&n);
    
    int arr[n];
    int i=0;
    //elements of the array
    printf("Enter the elements of the array:\n");
    for(i-0;i<n;i++){
    scanf("%d",&arr[i]);
    }
    
   //int n = sizeof(arr) / sizeof(arr[0]);
   printf("Arrays after shifting zeroes:\n");
    ShiftZeroes(arr, n);
    for (int i = 0; i < n; i++){
      printf("%d ", arr[i]);
    }
    return 0;
}
